<include file="Public/header" />
<include file="Public/menu" />

<!-- 内容页 -->
<div class="content-wrapper">
    <!-- 面包屑 -->
    <section class="content-header">
        <h1>
            后台
            <small>管理</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 后台管理</a></li>
            <li class="active">列表</li>
        </ol>
    </section>

    <!-- 内容 -->
    <section class="content">
        <!-- 内容头部 -->
        <div class="row" style="display: flex">
            <div class="col-lg-3 col-xs-6">
                <div class="small-box bg-aqua">
                    <div class="inner">
                        <h3>{$daihuifu}</h3>
                        <p>待回复咨询</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-bag"></i>
                    </div>
                    <a href="{:U('MemberComplain/index')}" class="small-box-footer">马上处理<i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <div class="col-lg-3 col-xs-6">
                <div class="small-box bg-green">
                    <div class="inner">
                        <h3>{$daifahuo}</h3>
                        <p>待发货订单</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-stats-bars"></i>
                    </div>
                    <a href="{:U('Orders/orderList')}" class="small-box-footer">马上处理<i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <div class="col-lg-3 col-xs-6">
                <div class="small-box bg-yellow">
                    <div class="inner">
                        <h3>{$jiesuan}</h3>
                        <p>待确认结算</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-person-add"></i>
                    </div>
                    <a href="{:U('Bills/index')}" class="small-box-footer">马上处理 <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <div class="col-lg-3 col-xs-6">
                <div class="small-box bg-red">
                    <div class="inner">
                        <h3>{$kucun}</h3>
                        <p>库存缺货</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="#" class="small-box-footer">马上处理<i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <div class="col-lg-3 col-xs-6">
                <div class="small-box" style="background-color: #990099; color:#f9f9f9">
                    <div class="inner">
                        <h3>{$tuikuan}</h3>
                        <p>待处理退款</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="{:U('Refund/index',['view'=>1])}" class="small-box-footer">马上处理<i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
        </div>
        <!-- 内容2 -->
        <div class="row">
            <!-- 内容左边 -->
            <section class="col-lg-12 connectedSortable">
                <!-- Custom tabs (Charts with tabs)-->
                <div class="nav-tabs-custom">
                    <!-- Tabs within a box -->
                    <ul class="nav nav-tabs pull-right">
                        <li class="active"><a href="#revenue-chart" data-toggle="tab">销售额分析</a></li>
                        <li><a href="#sales-chart" data-toggle="tab">单品销售TOP5</a></li>
                        <li class="pull-left header"><i class="fa fa-inbox"></i> 运营分析</li>
                    </ul>
                    <div class="tab-content no-padding">
                        <!-- Morris chart - Sales -->
                        <div class="chart tab-pane active" id="revenue-chart" style="position: relative; height: 384px;">
                            <!-- LINE CHART -->
                            <div class="box box-info">
                                <div class="box-header with-border">
                                    <h3 class="box-title"></h3>
                                </div>
                                <div class="box-body chart-responsive">
                                    <div class="chart" id="line-chart" style="height: 300px;"></div>
                                </div>
                                <!-- /.box-body -->
                            </div>
                            <!-- /.box -->
                        </div>
                        <div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>
                    </div>
                </div>
                <!-- /.nav-tabs-custom -->

            </section>
        </div>
        <!-- /.row (main row) -->



        <div class="row">
            <section class="col-lg-12 connectedSortable">
                <!-- BAR CHART -->
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title"><i class="fa fa-inbox"></i> 订单分析</h3>
                    </div>
                    <div class="box-body chart-responsive">
                        <div class="chart" id="bar-chart" style="height: 300px;"></div>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </section>
        </div>


    </section>
    <!-- /.content -->
</div>
<!-- 底部 -->
<include file="Public/foot" />


<!-- jQuery 2.2.3 -->
<script src="/Public/admin/adminlte/plugins/jQuery/jquery-2.2.3.min.js"></script>


<!-- jQuery UI 1.11.4 -->
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
    $.widget.bridge('uibutton', $.ui.button);
</script>
<!-- Bootstrap 3.3.6 -->
<script src="/Public/admin/adminlte/bootstrap/js/bootstrap.min.js"></script>
<!-- Morris.js charts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="/Public/admin/adminlte/plugins/morris/morris.min.js"></script>
<!-- Sparkline -->
<script src="/Public/admin/adminlte/plugins/sparkline/jquery.sparkline.min.js"></script>
<!-- jvectormap -->
<script src="/Public/admin/adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="/Public/admin/adminlte/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- jQuery Knob Chart -->
<script src="/Public/admin/adminlte/plugins/knob/jquery.knob.js"></script>
<!-- daterangepicker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
<script src="/Public/admin/adminlte/plugins/daterangepicker/daterangepicker.js"></script>
<!-- datepicker -->
<script src="/Public/admin/adminlte/plugins/datepicker/bootstrap-datepicker.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="/Public/admin/adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<!-- Slimscroll -->
<script src="/Public/admin/adminlte/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="/Public/admin/adminlte/plugins/fastclick/fastclick.js"></script>


<!-- 下面是页面类容js的东西 -->
<!-- AdminLTE App -->
<script src="/Public/admin/adminlte/dist/js/app.min.js"></script>
<!--<script src="/Public/admin/adminlte/dist/js/pages/dashboard.js"></script>-->

<script>

    $(function () {

        "use strict";

        // LINE CHART
        var line = new Morris.Line({
            element: 'line-chart',
            resize: true,
            data: {$xiaoshoulist},
            xkey: 'order_day',
            ykeys: ['moneys'],
            labels: ['销售额'],
            lineColors: ['#3c8dbc'],
            hideHover: 'auto'
        });

        //Donut Chart
        var donut = new Morris.Donut({
            element: 'sales-chart',
            resize: true,
            colors: ["#3c8dbc", "#f56954", "#00a65a", "#f39a12", "#00c0ef"],
            data: {$saletop},
            hideHover: 'auto'
        });

        //BAR CHART
        var bar = new Morris.Bar({
            element: 'bar-chart',
            resize: true,
            data: {$dingdanfenxi},
            barColors: ['#00a65a', '#d3d7df'],
            xkey: 'order_day',
            ykeys: ['pays', 'refunds'],
            labels: ['支付订单', '退款订单'],
            hideHover: 'auto'
        });
    });

</script>